package com.ruoyi.order.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.BalanceRechargeOrderMapper;
import com.ruoyi.order.domain.BalanceRechargeOrder;
import com.ruoyi.order.service.IBalanceRechargeOrderService;

/**
 * 充值订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-13
 */
@Service
public class BalanceRechargeOrderServiceImpl implements IBalanceRechargeOrderService 
{
    @Autowired
    private BalanceRechargeOrderMapper balanceRechargeOrderMapper;

    /**
     * 查询充值订单
     * 
     * @param id 充值订单主键
     * @return 充值订单
     */
    @Override
    public BalanceRechargeOrder selectBalanceRechargeOrderById(Long id)
    {
        return balanceRechargeOrderMapper.selectBalanceRechargeOrderById(id);
    }

    /**
     * 查询充值订单列表
     * 
     * @param balanceRechargeOrder 充值订单
     * @return 充值订单
     */
    @Override
    public List<BalanceRechargeOrder> selectBalanceRechargeOrderList(BalanceRechargeOrder balanceRechargeOrder)
    {
        return balanceRechargeOrderMapper.selectBalanceRechargeOrderList(balanceRechargeOrder);
    }

    /**
     * 新增充值订单
     * 
     * @param balanceRechargeOrder 充值订单
     * @return 结果
     */
    @Override
    public int insertBalanceRechargeOrder(BalanceRechargeOrder balanceRechargeOrder)
    {
        balanceRechargeOrder.setCreateTime(DateUtils.getNowDate());
        return balanceRechargeOrderMapper.insertBalanceRechargeOrder(balanceRechargeOrder);
    }

    /**
     * 修改充值订单
     * 
     * @param balanceRechargeOrder 充值订单
     * @return 结果
     */
    @Override
    public int updateBalanceRechargeOrder(BalanceRechargeOrder balanceRechargeOrder)
    {
        balanceRechargeOrder.setUpdateTime(DateUtils.getNowDate());
        return balanceRechargeOrderMapper.updateBalanceRechargeOrder(balanceRechargeOrder);
    }

    /**
     * 批量删除充值订单
     * 
     * @param ids 需要删除的充值订单主键
     * @return 结果
     */
    @Override
    public int deleteBalanceRechargeOrderByIds(Long[] ids)
    {
        return balanceRechargeOrderMapper.deleteBalanceRechargeOrderByIds(ids);
    }

    /**
     * 删除充值订单信息
     * 
     * @param id 充值订单主键
     * @return 结果
     */
    @Override
    public int deleteBalanceRechargeOrderById(Long id)
    {
        return balanceRechargeOrderMapper.deleteBalanceRechargeOrderById(id);
    }
}
